<template>
	<view class="content">
		<Head title="意见反馈" @back="back" icon="icon-arrow-left-bold"/>
        <div class="time">
            <div>
                <h3>联系方式</h3>
                <div><input v-model="phone" type="text" placeholder="请输入手机号"/></div>
            </div>
        </div>
        <div class="feedcontent">
            <div>
                <h3>反馈内容</h3>
                <div><textarea id="many" maxlength="200" placeholder="请输入"></textarea></div>
            </div>
        </div>
        <div class="btn" @click="feed">
            <b>提交反馈</b>
        </div>
	</view>
</template>

<script>
import Head from '@/components/head/index'

	export default {
        components:{Head},
		data() {
			return {
				list:['微信支付 宏烨找房','微信支付 宏烨找房'],
                phone: "",
			}
		},
		onLoad() {

		},
		methods: {
            back(){
                wx.navigateBack({
                    delta: 1
                })
            },
            feed(){
                if (/^1[3-9]\d{9}$/.test(this.phone)) {
                    wx.showToast({
                        title: '反馈成功',
                        icon: 'success',
                        duration: 2000
                    })
                    setTimeout(()=>{
                        wx.navigateBack({
                            delta: 1
                        })
                    },1000)
                }else{
                    wx.showToast({
                        title: '电话号码错误',
                        icon: 'error',
                        duration: 2000
                    })
                }
            }
		}
	}
</script>

<style scoped lang="scss">
    .content{
        background-color: #eee;
    }
    .time{
        height: 150rpx;
        background-color: #fff;
        display: flex;
        flex-direction: column;
        justify-content:space-around;
        margin-bottom: 20rpx;
        >div{
            width: 90%;
            margin:0 auto;
            display: flex;
            flex-direction: column;
            h3{
                font-size:22rpx;
            }
            >div{
                height: 80rpx;
                display: flex;
                align-items: center;
            }
        }
    }
	
    .feedcontent{
        background-color: #fff;
        display: flex;
        flex-direction: column;
        justify-content:space-around;
        margin-bottom: 20rpx;
        >div{
            width: 90%;
            margin:0 auto;
            display: flex;
            flex-direction: column;
            h3{
                font-size:22rpx;
            }
            
        }
    }
    .btn{
        position: fixed;
        bottom: 0;
        left: 5%;
        width: 90%;
        height: 100rpx;
        line-height: 100rpx;
        background-color: rgba(255, 101, 111, 1);
        border-radius: 120rpx;
        color:#fff;
        text-align: center;
        b{
            font-size:36rpx;
            font-weight:900;
        }
    }
</style>
